MuleSoft Accelerator for Retail
SAP custom BAPI setup guide - customer profile sync
The following provides guidance on how to use the custom BAPI code (ZBAPI_CUSTOMER) for your SAP instance.
Important: You must complete the following instructions before proceeding to Use case 1 - Customer profile sync from SAP.
BAPI custom objects
You must create the following ABAP objects in order to use this custom BAPI, which are described below.
Data elements:
Z_MASTER_ID
Structures
ZES_CUSTOMERZES_CONTROLDATA
Table types:
ZTY_CUSTOMER
Transparent tables
ZTT_CUSTOMER
Function group:
ZFG_CUSTOMERZFG_CUSTOMER2
Function modules:
ZBAPI_CUSTOMERZBAPI_CUSTOMER_CREATEZBAPI_CUSTOMER_CUSTOM_FIELDSZBAPI_CUSTOMER_UPDATEZBAPI_QUERYZBAPI_ADDR_QUERYZBAPI_QUERY_SAPZBAPI_CUST_QUERYZBAPI_CUSTOMER_CD
Creating data elements
| Object | How to create |
|---|---|
Z_MASTER_ID |
Creating structures
| Object | How to create |
|---|---|
ZES_CUSTOMER | |
ZES_CONTROLDATA |
Creating table types
| Object | How to create |
|---|---|
ZTY_CUSTOMER |
Creating transparent tables
| Object | How to create |
|---|---|
ZTT_CUSTOMER |
Creating function groups and function modules
- Create the function group "ZFG_CUSTOMER".
- Create the function module "ZBAPI_CUSTOMER", using "Remote-enable module" as processing type:
- Complete the import parameters with the following:
- Complete the export parameters with the following:
- Copy and paste the code from "ZBAPI_CUSTOMER.txt".
- Create the function module "ZBAPI_CUSTOMER_CREATE":
- Complete the import parameters with the following:
- Complete the export parameters with the following:
- Copy and paste the code from "ZBAPI_CUSTOMER_CREATE.txt".
- Create the function module "ZBAPI_CUSTOMER_CUSTOM_FIELDS":
- Complete the import parameters with the following:
- Copy and paste the code from "ZBAPI_CUSTOMER_CUSTOM_FIELDS.txt".
- Create the function module "ZBAPI_CUSTOMER_UPDATE":
- Complete the import parameters with the following:
- Complete the export parameters with the following:
- Copy and paste the code from "ZBAPI_CUSTOMER_UPDATE.txt".
- Create the function module "ZBAPI_QUERY", using "Remote-enable module" as processing type:
- Complete the import parameters with the following:
- Complete the export parameters with the following:
- Copy and paste the code from "ZBAPI_QUERY.txt".
- Create the function module "ZBAPI_CONTROL_DATA":
- Complete the import parameters with the following:
- Complete the export parameters with the following:
- Copy the source code from "ZBAPI_CONTROL_DATA.txt".
- Activate the entire function group by right-clicking on it in the tree and then selecting "Activate":
- Create the function group "ZFG_CUSTOMER2".
- Create the function module "ZBAPI_ADDR_QUERY", using "Remote-enable module" as processing type:
- Complete the import parameters with the following:
- Complete the export parameters with the following:
- Copy and paste the code from "ZBAPI_ADDR_QUERY.txt".
- Create the function module "ZBAPI_QUERY_SAP" using "Remote-enable module" as processing type:
- Complete the import parameters with the following:
- Complete the export parameters with the following:
- Copy and paste the code from "ZBAPI_QUERY_SAP.txt".
- Create the function module "ZBAPI_CUST_QUERY", using "Remote-enable module" as processing type:
- Complete the import parameters with the following:
- Complete the export parameters with the following:
- Copy and paste the code from "ZBAPI_CUST_QUERY.txt".
- Create the function module "ZBAPI_CUSTOMER_CD" using "Remote-enable module" as processing type:
- Complete the import parameters with the following:
- Complete the export parameters with the following:
- Copy and paste the code from "ZBAPI_CUSTOMER_CD.txt".
- Activate the entire function group by right-clicking on it in the tree and then selecting "Activate":